import Vue from 'vue'
import {ENV} from './env'

const ENUM = {
    // 状态
    status: [
        { key: 0, text: '待审核', type: 'warning' },
        { key: 1, text: '通过', type: 'success' },
        { key: 2, text: '拒绝', type: 'error' },
        { key: 3, text: '审核中', type: 'primary' },
        { key: 4, text: '撤回', type: 'info' },
        { key: 5, text: '未提交', type: 'info' },
        { key: 6, text: '已作废', type: 'error' },
    ],
    // 待办事项消息
    messageNum: {
        todayCustomer: 0,
        followLeads: 0,
        followPreSales: 0,
        followCustomer: 0,
        checkReceivables: 0,
        remindReceivablesPlan: 0,
        endContract: 0,
        checkLeads: 0,
        checkPreSales: 0,
        checkCustomer: 0,
        checkContract: 0,
        checkBusiness: 0,
        totalNum: 0
    },
    // 上传地址
    upload: {
        url: ENV[process.env.NODE_ENV].API_URL + '/file/upload',
        urlOss: ENV[process.env.NODE_ENV].API_URL +  '/file/uploadOss'
    },
    // 图片回显地址
    aliyunOssUrl: 'https://yuzhen-moses.oss-cn-shanghai.aliyuncs.com/SAAS-CRM/',
    // 产品类型
    productType: [
        {key: 0, text:'进销存'},
        {key: 1, text:'商机'},
        {key: 2, text:'通用'}
    ]
}

// ENUM
Object.defineProperty(Vue.prototype, '$enum', {
    get() {
        return ENUM;
    },
});